package com.zara.store.client.view.swing;

import java.awt.Color;
import java.awt.Container;
import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.SwingConstants;

import com.zara.store.main.Main;

public class InvoiceWindow extends JFrame {

	private static final long serialVersionUID = 1L;
	
	private final JLabel labelContent;
	private final JScrollPane scrollContent;
	
	public InvoiceWindow() {
		
		labelContent = new JLabel();
		scrollContent = new JScrollPane();
		
		initComponents();
		
	}

	private void initComponents() {
        setIconImage(Main.createImageIcon("/com/zara/store/client/resources/retail.gif").getImage());
		scrollContent.setViewportView(labelContent);
		
		labelContent.setBackground(new Color(0xffffff));
		labelContent.setVerticalAlignment(SwingConstants.TOP);
		labelContent.setHorizontalAlignment(SwingConstants.CENTER);

		GridLayout layout = new GridLayout(1,0);
		Container pane = getContentPane();
		pane.setLayout(layout);
		pane.add(scrollContent);
		
		//setLocationRelativeTo(getOwner());
	}

	public void setContent(String content) {
		labelContent.setText(content);
	}

}
